package com.cheney.compass;

import net.youmi.android.appoffers.AppOffersManager;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class SystemSettingActivity extends Activity {

	private Button setting_ad_button;
	private AlertDialog.Builder dialog;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.settings);
		setting_ad_button = (Button)findViewById(R.id.setting_ad_button);
		setting_ad_button.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				dialog = new Builder(SystemSettingActivity.this);
				dialog.setTitle(R.string.alert_title);
				dialog.setMessage(R.string.alert_text);
				dialog.setPositiveButton(R.string.alert_button_no, new DialogInterface.OnClickListener() {
					@Override
					public void onClick(DialogInterface arg0, int arg1) {
						
					}
				});
				dialog.setNegativeButton(R.string.alert_button_yes, new DialogInterface.OnClickListener() {
					@Override
					public void onClick(DialogInterface arg0, int arg1) {
						AppOffersManager.showAppOffers(SystemSettingActivity.this);
					}
				});
				dialog.show();
			}
		});
	}
	
}
